import time
import unittest
from Finance_api.tool.HTMLTestReport import HTMLTestReport

# suite = unittest.TestSuite()
# suite.addTest(unittest.makeSuite(TestProcess))

suite = unittest.defaultTestLoader.discover("./scripts", pattern="test_Investment_process*.py")
report = "./report/report_{}.html".\
    format(time.strftime("%Y_%m_%d %H_%M_%S"))

with open(report, "wb") as f:
    # runner = HTMLTestRunner(f, title="金融管理系统接口测试报告", verbosity=0)
    # runner = HTMLTestReport(f, title="金融管理系统接口测试报告", verbosity=0)
    runner = HTMLTestReport(stream=f, title="金融管理系统接口测试报告", description="接口测试", tester="第二小组")
    runner.run(suite)
